package com.aaa.controller;

import com.aaa.service.RoleService;
import com.aaa.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/role")
public class RoleController {
    @Autowired
    private RoleService roleService;

    @RequestMapping("/list")
    @ResponseBody
    public R list() {
        return roleService.findAll();
    }

    @RequestMapping("/listByPage")
    @ResponseBody
    public R listByPage(Integer current,Integer pageSize) {
        return roleService.findAllByPage(current,pageSize);
    }
}








